<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

	<h:head>
		<title>Using Collections</title>
		<link href="../08/css/styles.css" rel="stylesheet" type="text/css" />
	</h:head> 
	<body>
		<table border="5" align="center">
			<tr>
				<th class="title">Using Collections</th>
			</tr>
		</table> 
		<br/>
		
		<h3>Choose Purchases</h3>
		<h:form>
			<ul>
				<li>
					<b>Cheap Items</b>
					<ol>
						<li>
							<h:inputText value="#{purchases.cheapItems[0]}" />
						</li>
						<li>
							<h:inputText value="#{purchases.cheapItems[1]}" />
						</li>
						<li>
							<h:inputText value="#{purchases.cheapItems[2]}" />
						</li>
					</ol>				
				</li>
				<li>
					<b>Medium Items</b>
					<ol>
						<li>
							<h:inputText value="#{purchases.mediumItems[0]}" />
						</li>
						<li>
							<h:inputText value="#{purchases.mediumItems[1]}" />
						</li>
						<li>
							<h:inputText value="#{purchases.mediumItems[2]}" />
						</li>
					</ol>
				</li>
				<li>
					<b>Valuable Items</b>
					<ol>
						<li>
							<h:inputText value='#{purchases.valuableItems["low"]}' />
						</li>
						<li>
							<h:inputText value='#{purchases.valuableItems["medium"]}' />
						</li>
						<li>
							<h:inputText value='#{purchases.valuableItems["high"]}' />
						</li>
					</ol>
				</li>
			</ul>
			<h:commandButton value="Purchase" action="#{purchases.purchaseItems()}" />
		</h:form>
	</body> 
</html>
